﻿using System.Diagnostics;

namespace FadeGameFramework
{
    public sealed class GameClock
    {
        private readonly Stopwatch stopwatch = new Stopwatch();

        public float DeltaTime { get; private set; } = 1/60f;

        public void Start() {
            stopwatch.Start();
        }

        public void StopAndReset() {
            stopwatch.Stop();
            DeltaTime = stopwatch.ElapsedMilliseconds/1000f;
            stopwatch.Reset();
        }
    }
}